3.5.11 \(\int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx\) [411]

3.5.11.1 Optimal result
3.5.11.2 Mathematica [A] (verified)
3.5.11.3 Rubi [A] (verified)
3.5.11.4 Maple [C] (verified)
3.5.11.5 Fricas [A] (verification not implemented)
3.5.11.6 Sympy [F(-1)]
3.5.11.7 Maxima [A] (verification not implemented)
3.5.11.8 Giac [B] (verification not implemented)
3.5.11.9 Mupad [B] (verification not implemented)

3.5.11.1 Optimal result

Integrand size = 21, antiderivative size = 165 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {2 b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{35 d}+\frac {\sec ^7(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{7 d}+\frac {2 \sec ^5(c+d x) (a+b \sin (c+d x)) \left (2 a b+\left (3 a^2-b^2\right ) \sin (c+d x)\right )}{35 d}+\frac {12 a \left (2 a^2-b^2\right ) \tan (c+d x)}{35 d}+\frac {4 a \left (2 a^2-b^2\right ) \tan ^3(c+d x)}{35 d} \]

output
2/35*b*(3*a^2-b^2)*sec(d*x+c)^3/d+1/7*sec(d*x+c)^7*(b+a*sin(d*x+c))*(a+b*s 
in(d*x+c))^2/d+2/35*sec(d*x+c)^5*(a+b*sin(d*x+c))*(2*a*b+(3*a^2-b^2)*sin(d 
*x+c))/d+12/35*a*(2*a^2-b^2)*tan(d*x+c)/d+4/35*a*(2*a^2-b^2)*tan(d*x+c)^3/ 
d
 
3.5.11.2 Mathematica [A] (verified)

Time = 1.73 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.48 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {\sec ^7(c+d x) \left (15360 a^2 b+1536 b^3+35 b \left (-75 a^2+17 b^2\right ) \cos (c+d x)-3584 b^3 \cos (2 (c+d x))-1575 a^2 b \cos (3 (c+d x))+357 b^3 \cos (3 (c+d x))-525 a^2 b \cos (5 (c+d x))+119 b^3 \cos (5 (c+d x))-75 a^2 b \cos (7 (c+d x))+17 b^3 \cos (7 (c+d x))+8960 a^3 \sin (c+d x)+13440 a b^2 \sin (c+d x)+5376 a^3 \sin (3 (c+d x))-2688 a b^2 \sin (3 (c+d x))+1792 a^3 \sin (5 (c+d x))-896 a b^2 \sin (5 (c+d x))+256 a^3 \sin (7 (c+d x))-128 a b^2 \sin (7 (c+d x))\right )}{35840 d} \]

input
Integrate[Sec[c + d*x]^8*(a + b*Sin[c + d*x])^3,x]
 
output
(Sec[c + d*x]^7*(15360*a^2*b + 1536*b^3 + 35*b*(-75*a^2 + 17*b^2)*Cos[c + 
d*x] - 3584*b^3*Cos[2*(c + d*x)] - 1575*a^2*b*Cos[3*(c + d*x)] + 357*b^3*C 
os[3*(c + d*x)] - 525*a^2*b*Cos[5*(c + d*x)] + 119*b^3*Cos[5*(c + d*x)] - 
75*a^2*b*Cos[7*(c + d*x)] + 17*b^3*Cos[7*(c + d*x)] + 8960*a^3*Sin[c + d*x 
] + 13440*a*b^2*Sin[c + d*x] + 5376*a^3*Sin[3*(c + d*x)] - 2688*a*b^2*Sin[ 
3*(c + d*x)] + 1792*a^3*Sin[5*(c + d*x)] - 896*a*b^2*Sin[5*(c + d*x)] + 25 
6*a^3*Sin[7*(c + d*x)] - 128*a*b^2*Sin[7*(c + d*x)]))/(35840*d)
 
3.5.11.3 Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.98, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3170, 27, 3042, 3340, 27, 3042, 3148, 3042, 4254, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (c+d x))^3}{\cos (c+d x)^8}dx\)

\(\Big \downarrow \) 3170

\(\displaystyle \frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}-\frac {1}{7} \int -2 \sec ^6(c+d x) (a+b \sin (c+d x)) \left (3 a^2+2 b \sin (c+d x) a-b^2\right )dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2}{7} \int \sec ^6(c+d x) (a+b \sin (c+d x)) \left (3 a^2+2 b \sin (c+d x) a-b^2\right )dx+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2}{7} \int \frac {(a+b \sin (c+d x)) \left (3 a^2+2 b \sin (c+d x) a-b^2\right )}{\cos (c+d x)^6}dx+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 3340

\(\displaystyle \frac {2}{7} \left (\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}-\frac {1}{5} \int -3 \sec ^4(c+d x) \left (2 a \left (2 a^2-b^2\right )+b \left (3 a^2-b^2\right ) \sin (c+d x)\right )dx\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2}{7} \left (\frac {3}{5} \int \sec ^4(c+d x) \left (2 a \left (2 a^2-b^2\right )+b \left (3 a^2-b^2\right ) \sin (c+d x)\right )dx+\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2}{7} \left (\frac {3}{5} \int \frac {2 a \left (2 a^2-b^2\right )+b \left (3 a^2-b^2\right ) \sin (c+d x)}{\cos (c+d x)^4}dx+\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 3148

\(\displaystyle \frac {2}{7} \left (\frac {3}{5} \left (2 a \left (2 a^2-b^2\right ) \int \sec ^4(c+d x)dx+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}\right )+\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2}{7} \left (\frac {3}{5} \left (2 a \left (2 a^2-b^2\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}\right )+\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {2}{7} \left (\frac {3}{5} \left (\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}-\frac {2 a \left (2 a^2-b^2\right ) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}\right )+\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2}{7} \left (\frac {\sec ^5(c+d x) (a+b \sin (c+d x)) \left (\left (3 a^2-b^2\right ) \sin (c+d x)+2 a b\right )}{5 d}+\frac {3}{5} \left (\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}-\frac {2 a \left (2 a^2-b^2\right ) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )\right )+\frac {\sec ^7(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{7 d}\)

input
Int[Sec[c + d*x]^8*(a + b*Sin[c + d*x])^3,x]
 
output
(Sec[c + d*x]^7*(b + a*Sin[c + d*x])*(a + b*Sin[c + d*x])^2)/(7*d) + (2*(( 
Sec[c + d*x]^5*(a + b*Sin[c + d*x])*(2*a*b + (3*a^2 - b^2)*Sin[c + d*x]))/ 
(5*d) + (3*((b*(3*a^2 - b^2)*Sec[c + d*x]^3)/(3*d) - (2*a*(2*a^2 - b^2)*(- 
Tan[c + d*x] - Tan[c + d*x]^3/3))/d))/5))/7
 

3.5.11.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3148
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + 
 Simp[a   Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && 
 (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
 

rule 3170
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x 
])^(m - 1)*((b + a*Sin[e + f*x])/(f*g*(p + 1))), x] + Simp[1/(g^2*(p + 1)) 
  Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + 
a^2*(p + 2) + a*b*(m + p + 1)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g 
}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && (IntegersQ[2*m, 2* 
p] || IntegerQ[m])
 

rule 3340
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(g* 
Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x])^m*((d + c*Sin[e + f*x])/(f*g*(p 
 + 1))), x] + Simp[1/(g^2*(p + 1))   Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Si 
n[e + f*x])^(m - 1)*Simp[a*c*(p + 2) + b*d*m + b*c*(m + p + 2)*Sin[e + f*x] 
, x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2, 0] && GtQ 
[m, 0] && LtQ[p, -1] && IntegerQ[2*m] &&  !(EqQ[m, 1] && NeQ[c^2 - d^2, 0] 
&& SimplerQ[c + d*x, a + b*x])
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 
3.5.11.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 1.97 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.21

method result size
risch \(-\frac {16 \left (70 i a \,b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+14 b^{3} {\mathrm e}^{9 i \left (d x +c \right )}-70 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-35 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-120 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-12 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-42 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+21 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+14 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-14 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+7 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}+i a \,b^{2}\right )}{35 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{7}}\) \(199\)
derivativedivides \(\frac {-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {3 a^{2} b}{7 \cos \left (d x +c \right )^{7}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(219\)
default \(\frac {-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )+\frac {3 a^{2} b}{7 \cos \left (d x +c \right )^{7}}+3 a \,b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )}{d}\) \(219\)
parallelrisch \(-\frac {2 \left (35 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+105 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b -70 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+140 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+70 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+301 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+112 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+525 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +70 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}-212 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+456 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+140 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+301 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+112 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+315 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b +28 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}-70 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{3}+140 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a \,b^{2}+14 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{3}+35 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+15 a^{2} b -2 b^{3}\right )}{35 d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{7}}\) \(359\)

input
int(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
 
output
-16/35*(70*I*a*b^2*exp(8*I*(d*x+c))+14*b^3*exp(9*I*(d*x+c))-70*I*a^3*exp(6 
*I*(d*x+c))-35*I*a*b^2*exp(6*I*(d*x+c))-120*a^2*b*exp(7*I*(d*x+c))-12*b^3* 
exp(7*I*(d*x+c))-42*I*a^3*exp(4*I*(d*x+c))+21*I*a*b^2*exp(4*I*(d*x+c))+14* 
b^3*exp(5*I*(d*x+c))-14*I*a^3*exp(2*I*(d*x+c))+7*I*a*b^2*exp(2*I*(d*x+c))- 
2*I*a^3+I*a*b^2)/d/(1+exp(2*I*(d*x+c)))^7
 
3.5.11.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.75 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {7 \, b^{3} \cos \left (d x + c\right )^{2} - 15 \, a^{2} b - 5 \, b^{3} - {\left (8 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{4} + 5 \, a^{3} + 15 \, a b^{2} + 3 \, {\left (2 \, a^{3} - a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{35 \, d \cos \left (d x + c\right )^{7}} \]

input
integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="fricas")
 
output
-1/35*(7*b^3*cos(d*x + c)^2 - 15*a^2*b - 5*b^3 - (8*(2*a^3 - a*b^2)*cos(d* 
x + c)^6 + 4*(2*a^3 - a*b^2)*cos(d*x + c)^4 + 5*a^3 + 15*a*b^2 + 3*(2*a^3 
- a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^7)
 
3.5.11.6 Sympy [F(-1)]

Timed out. \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\text {Timed out} \]

input
integrate(sec(d*x+c)**8*(a+b*sin(d*x+c))**3,x)
 
output
Timed out
 
3.5.11.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.75 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {{\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{3} + {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} a b^{2} - \frac {{\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} b^{3}}{\cos \left (d x + c\right )^{7}} + \frac {15 \, a^{2} b}{\cos \left (d x + c\right )^{7}}}{35 \, d} \]

input
integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="maxima")
 
output
1/35*((5*tan(d*x + c)^7 + 21*tan(d*x + c)^5 + 35*tan(d*x + c)^3 + 35*tan(d 
*x + c))*a^3 + (15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3) 
*a*b^2 - (7*cos(d*x + c)^2 - 5)*b^3/cos(d*x + c)^7 + 15*a^2*b/cos(d*x + c) 
^7)/d
 
3.5.11.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 358 vs. \(2 (155) = 310\).

Time = 0.35 (sec) , antiderivative size = 358, normalized size of antiderivative = 2.17 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=-\frac {2 \, {\left (35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} + 105 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 70 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 140 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 301 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 112 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 525 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 70 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 212 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 456 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 140 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 301 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 112 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 315 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 28 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 70 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 140 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 14 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 35 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, a^{2} b - 2 \, b^{3}\right )}}{35 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7} d} \]

input
integrate(sec(d*x+c)^8*(a+b*sin(d*x+c))^3,x, algorithm="giac")
 
output
-2/35*(35*a^3*tan(1/2*d*x + 1/2*c)^13 + 105*a^2*b*tan(1/2*d*x + 1/2*c)^12 
- 70*a^3*tan(1/2*d*x + 1/2*c)^11 + 140*a*b^2*tan(1/2*d*x + 1/2*c)^11 + 70* 
b^3*tan(1/2*d*x + 1/2*c)^10 + 301*a^3*tan(1/2*d*x + 1/2*c)^9 + 112*a*b^2*t 
an(1/2*d*x + 1/2*c)^9 + 525*a^2*b*tan(1/2*d*x + 1/2*c)^8 + 70*b^3*tan(1/2* 
d*x + 1/2*c)^8 - 212*a^3*tan(1/2*d*x + 1/2*c)^7 + 456*a*b^2*tan(1/2*d*x + 
1/2*c)^7 + 140*b^3*tan(1/2*d*x + 1/2*c)^6 + 301*a^3*tan(1/2*d*x + 1/2*c)^5 
 + 112*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 315*a^2*b*tan(1/2*d*x + 1/2*c)^4 + 2 
8*b^3*tan(1/2*d*x + 1/2*c)^4 - 70*a^3*tan(1/2*d*x + 1/2*c)^3 + 140*a*b^2*t 
an(1/2*d*x + 1/2*c)^3 + 14*b^3*tan(1/2*d*x + 1/2*c)^2 + 35*a^3*tan(1/2*d*x 
 + 1/2*c) + 15*a^2*b - 2*b^3)/((tan(1/2*d*x + 1/2*c)^2 - 1)^7*d)
 
3.5.11.9 Mupad [B] (verification not implemented)

Time = 5.02 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.92 \[ \int \sec ^8(c+d x) (a+b \sin (c+d x))^3 \, dx=\frac {{\cos \left (c+d\,x\right )}^4\,\left (\frac {8\,a^3\,\sin \left (c+d\,x\right )}{35}-\frac {4\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {16\,a^3\,\sin \left (c+d\,x\right )}{35}-\frac {8\,a\,b^2\,\sin \left (c+d\,x\right )}{35}\right )-{\cos \left (c+d\,x\right )}^2\,\left (-\frac {6\,\sin \left (c+d\,x\right )\,a^3}{35}+\frac {3\,\sin \left (c+d\,x\right )\,a\,b^2}{35}+\frac {b^3}{5}\right )+\frac {3\,a^2\,b}{7}+\frac {a^3\,\sin \left (c+d\,x\right )}{7}+\frac {b^3}{7}+\frac {3\,a\,b^2\,\sin \left (c+d\,x\right )}{7}}{d\,{\cos \left (c+d\,x\right )}^7} \]

input
int((a + b*sin(c + d*x))^3/cos(c + d*x)^8,x)
 
output
(cos(c + d*x)^4*((8*a^3*sin(c + d*x))/35 - (4*a*b^2*sin(c + d*x))/35) + co 
s(c + d*x)^6*((16*a^3*sin(c + d*x))/35 - (8*a*b^2*sin(c + d*x))/35) - cos( 
c + d*x)^2*(b^3/5 - (6*a^3*sin(c + d*x))/35 + (3*a*b^2*sin(c + d*x))/35) + 
 (3*a^2*b)/7 + (a^3*sin(c + d*x))/7 + b^3/7 + (3*a*b^2*sin(c + d*x))/7)/(d 
*cos(c + d*x)^7)